home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot / sun4.md / getidprom.s < prev    next >
Encoding:
Text File  |  1989-11-07  |  686 b   |  32 lines

  1. !
  2. !    .seg    "data"
  3. !    .asciz    "@(#)getidprom.s 1.3 88/02/08"
  4. !    Copyright (c) 1986 by Sun Microsystems, Inc.
  5. !
  6.  
  7. #define IDPROMBASE 0x00000000    
  8. #define IDPROMSIZE 0x20        
  9. #define ASI_CTL 2    
  10.     .align 4
  11.     .seg    "text"
  12. !
  13. ! getidprom(addr, size)
  14. !
  15. ! Read the ID prom.
  16. ! This is mapped from IDPROMBASE for IDPROMSIZE bytes in the
  17. ! ASI_CTL address space for byte access only.
  18.     .global _getidprom
  19. _getidprom:
  20.     set     IDPROMBASE, %g1
  21.     clr     %g2
  22. 1:
  23.     lduba   [%g1 + %g2]ASI_CTL, %g7 ! get id prom byte
  24.     add     %g2, 1, %g2        ! interlock
  25.     stb     %g7, [%o0]        ! put it out
  26.     cmp     %g2, %o1        ! done yet?
  27.     bne,a   1b
  28.     add     %o0, 1, %o0        ! delay slot
  29.     retl                ! leaf routine return
  30.     nop                ! delay slot
  31.